Mounted at /content/drive
Data files loaded successfully!
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 20 entries, 0 to 19
Data columns (total 12 columns):
 #   Column                  Non-Null Count  Dtype  
---  ------                  --------------  -----  
 0   Victim_Age              20 non-null     object 
 1   Total_Victims           20 non-null     float64
 2   Male_Victims            20 non-null     float64
 3   Female_Victims          20 non-null     float64
 4   Unknown_Sex             20 non-null     float64
 5   White                   20 non-null     float64
 6   Black_African_American  20 non-null     float64
 7   Other_Race              20 non-null     float64
 8   Unknown_Race            20 non-null     float64
 9   Hispanic_Latino         20 non-null     float64
 10  Not_Hispanic_Latino     20 non-null     float64
 11  Unknown_Ethnicity       20 non-null     float64
dtypes: float64(11), object(1)
memory usage: 2.0+ KB
Out[ ]:
0
Victim_Age 0
Total_Victims 0
Male_Victims 0
Female_Victims 0
Unknown_Sex 0
White 0
Black_African_American 0
Other_Race 0
Unknown_Race 0
Hispanic_Latino 0
Not_Hispanic_Latino 0
Unknown_Ethnicity 0

Out[ ]:
Victim_Age Total_Victims Male_Victims Female_Victims Unknown_Sex White Black_African_American Other_Race Unknown_Race Hispanic_Latino Not_Hispanic_Latino Unknown_Ethnicity
Out[ ]:
Victim_Age Total_Victims Male_Victims Female_Victims Unknown_Sex White Black_African_American Other_Race Unknown_Race Hispanic_Latino Not_Hispanic_Latino Unknown_Ethnicity
15 60 to 64 611.0 424.0 186.0 1.0 355.0 209.0 28.0 19.0 45.0 395.0 68.0
16 65 to 69 417.0 284.0 133.0 0.0 252.0 136.0 24.0 5.0 32.0 276.0 29.0
17 70 to 74 245.0 139.0 105.0 1.0 162.0 62.0 17.0 4.0 13.0 169.0 15.0
18 75 and over 305.0 147.0 156.0 2.0 228.0 47.0 20.0 10.0 17.0 199.0 16.0
19 Unknown 188.0 114.0 35.0 39.0 50.0 70.0 3.0 65.0 17.0 68.0 64.0
Out[ ]:
Total_Victims Male_Victims Female_Victims Unknown_Sex White Black_African_American Other_Race Unknown_Race Hispanic_Latino Not_Hispanic_Latino Unknown_Ethnicity
count 20.000000 20.000000 20.000000 20.000000 20.000000 20.000000 20.000000 20.000000 20.00000 20.00000 20.000000
mean 1076.000000 842.600000 229.050000 4.350000 430.600000 577.500000 34.000000 33.900000 166.60000 640.80000 87.100000
std 1020.181614 847.871229 177.521674 8.542618 346.084322 636.192415 27.545178 29.882049 184.43096 599.57341 77.799269
min 108.000000 64.000000 35.000000 0.000000 44.000000 39.000000 3.000000 4.000000 13.00000 66.00000 8.000000
25% 234.500000 132.750000 100.500000 1.000000 142.500000 68.000000 15.250000 11.500000 18.50000 154.50000 22.000000
50% 751.000000 578.000000 192.000000 3.000000 391.000000 331.500000 26.500000 26.500000 96.50000 461.00000 63.500000
75% 1636.250000 1327.250000 372.000000 3.000000 715.250000 909.000000 55.250000 47.750000 292.75000 964.25000 134.500000
max 3807.000000 3063.000000 732.000000 39.000000 1323.000000 2266.000000 94.000000 124.000000 687.00000 2217.00000 304.000000
Out[ ]:
array(['Under 24', 'Infant (under 1)', '1 to 4', '5 to 8', '9 to 12',
       '13 to 16', '17 to 19', '20 to 24', '25 to 29', '30 to 34',
       '35 to 39', '40 to 44', '45 to 49', '50 to 54', '55 to 59',
       '60 to 64', '65 to 69', '70 to 74', '75 and over', 'Unknown'],
      dtype=object)
Out[ ]:
array(['Under 24', 'Infant (under 1)', '1 to 4', '5 to 8', '9 to 12',
       '13 to 16', '17 to 19', '20 to 24', '25 to 29', '30 to 34',
       '35 to 39', '40 to 44', '45 to 49', '50 to 54', '55 to 59',
       '60 to 64', '65 to 69', '70 to 74', '75 and over', 'Unknown'],
      dtype=object)
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image

Analyzing Homicide Circumstances (Table 10)

Out[ ]:
array(['Robbery', 'Burglary', 'Larceny-theft', 'Motor vehicle theft',
       'Arson', 'Prostitution and commercialized vice',
       'Other sex offenses', 'Narcotic drug laws', 'Gambling',
       'Other-not specified ', 'Human trafficking/Commercial sex acts',
       'Human trafficking/Involuntary servitude', 'Domestic violence',
       'Child killed by babysitter', 'Brawl due to influence of alcohol',
       'Brawl due to influence of narcotics',
       'Argument over money or property', 'Other arguments',
       'Gangland killings', 'Juvenile gang killings',
       'Institutional killings', 'Sniper attack', 'Unknown'], dtype=object)
No description has been provided for this image

Deeper Analysis of Victim-Offender Relationships (Table 10)

Out[ ]:
Index(['Circumstance', 'Total_Victims', 'Husband', 'Wife', 'Mother', 'Father',
       'Son', 'Daughter', 'Brother', 'Sister', 'Other_Family', 'Boyfriend',
       'Girlfriend', 'Neighbor', 'Employee', 'Employer', 'Stranger',
       'Unknown'],
      dtype='object')
No description has been provided for this image
No description has been provided for this image

Male vs. Female Victim Analysis

Out[ ]:
array(['Robbery', 'Burglary', 'Larceny-theft', 'Motor vehicle theft',
       'Arson', 'Prostitution and commercialized vice',
       'Other sex offenses', 'Narcotic drug laws', 'Gambling',
       'Other-not specified ', 'Human trafficking/Commercial sex acts',
       'Human trafficking/Involuntary servitude', 'Domestic violence',
       'Child killed by babysitter', 'Brawl due to influence of alcohol',
       'Brawl due to influence of narcotics',
       'Argument over money or property', 'Other arguments',
       'Gangland killings', 'Juvenile gang killings',
       'Institutional killings', 'Sniper attack', 'Unknown'], dtype=object)
No description has been provided for this image
Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True).

Analyzing Homicide Trends Over Time (2019-2023)

Out[ ]:
Index(['Murder Circumstances, 2019–2023', 'Unnamed: 1', 'Unnamed: 2',
       'Unnamed: 3', 'Unnamed: 4', 'Unnamed: 5', 'Unnamed: 6'],
      dtype='object')
Index(['Murder Circumstances, 2019–2023', 'Unnamed: 1', 'Unnamed: 2',
       'Unnamed: 3', 'Unnamed: 4', 'Unnamed: 5', 'Unnamed: 6'],
      dtype='object')
Index(['Circumstance', 'Victims_2019', 'Victims_2020', 'Victims_2021',
       'Victims_2022', 'Victims_2023'],
      dtype='object')
Total Homicides by Year: [14404. 18857. 16633. 19939. 17713.]
[14404. 18857. 16633. 19939. 17713.]
Out[ ]:
Index(['Circumstance', 'Victims_2019', 'Victims_2020', 'Victims_2021',
       'Victims_2022', 'Victims_2023'],
      dtype='object')
Out[ ]:
array(['Circumstances', 'Total', 'Felony type total:', 'Rape', 'Robbery',
       'Burglary', 'Larceny-theft', 'Motor vehicle theft', 'Arson',
       'Prostitution and commercialized vice', 'Other sex offenses',
       'Narcotic drug laws', 'Gambling', 'Other-not specified ',
       'Human trafficking/Commercial sex acts',
       'Human trafficking/Involuntary servitude',
       'Suspected felony type1', 'Other than felony type total:',
       'Domestic violence', 'Child killed by babysitter',
       'Brawl due to influence of alcohol1',
       'Brawl due to influence of narcotics1',
       'Argument over money or property1', 'Other arguments',
       'Gangland killings', 'Juvenile gang killings',
       'Institutional killings', 'Sniper attack1', 'Unknown',
       '1 Figures for suspected felony type, brawl due to influence of alcohol, brawl due to influence of narcotics, argument over money or property, and sniper attack include only data submitted by Summary reporting agencies because these circumstances are not collected via the National Incident-Based Reporting System.',
       "NOTE: Prior years' crime data has been updated; therefore, data presented in this table may not match previously published data."],
      dtype=object)
No description has been provided for this image

Analyzing Homicides by Weapon Type Over Time

Out[ ]:
Index(['Murder Circumstances', 'Unnamed: 1', 'Unnamed: 2', ' ', 'Unnamed: 4',
       'Unnamed: 5', 'Unnamed: 6', 'Unnamed: 7', 'Unnamed: 8', 'Unnamed: 9',
       'Unnamed: 10', 'Unnamed: 11', 'Unnamed: 12', 'Unnamed: 13',
       'Unnamed: 14', 'Unnamed: 15', 'Unnamed: 16', 'Unnamed: 17',
       'Unnamed: 18'],
      dtype='object')
Found Yearly Columns: []
Valid Weapon Categories: []
Out[ ]:
Murder Circumstances Unnamed: 1 Unnamed: 2 Unnamed: 4 Unnamed: 5 Unnamed: 6 Unnamed: 7 Unnamed: 8 Unnamed: 9 Unnamed: 10 Unnamed: 11 Unnamed: 12 Unnamed: 13 Unnamed: 14 Unnamed: 15 Unnamed: 16 Unnamed: 17 Unnamed: 18
0 by Weapon, 2023 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
1 Circumstances Total\nmurder\nvictims Total\nfirearms Handguns Rifles Shotguns Other\nguns or\ntype not\nstated Knives or\ncutting\ninstruments Blunt\nobjects\n(clubs,\nhammers,\netc.) Personal\nweapons\n(hands,\nfists, feet,\netc.) Poison Pushed\nor\nthrown\nout\nwindow1 Explosives Fire Narcotics Drowning1 Strangulation1 Asphyxiation Other
2 Total 17713 13529 7159 511 166 5693 1562 317 659 20 0 0 92 230 0 10 94 1200
3 Felony type total: 1321 907 522 24 11 350 85 27 35 1 0 0 39 130 0 4 7 86
4 Rape 10 1 0 0 0 1 0 1 3 0 0 0 1 1 0 1 1 1
['Circumstance', 'Total_Victims', 'Total_Firearms', 'Handguns', 'Rifles', 'Shotguns', 'Other_Guns', 'Knives', 'Blunt_Objects', 'Personal_Weapons', 'Poison', 'Pushed_Or_Thrown', 'Explosives', 'Fire', 'Narcotics', 'Drowning', 'Strangulation', 'Asphyxiation', 'Other']
No description has been provided for this image
Original columns: ['Circumstance', 'Total_Victims', 'Total_Firearms', 'Handguns', 'Rifles', 'Shotguns', 'Other_Guns', 'Knives', 'Blunt_Objects', 'Personal_Weapons', 'Poison', 'Pushed_Or_Thrown', 'Explosives', 'Fire', 'Narcotics', 'Drowning', 'Strangulation', 'Asphyxiation', 'Other']
Standardized columns: ['Circumstance', 'Total_Victims', 'Total_Firearms', 'Handguns', 'Rifles', 'Shotguns', 'Other_Guns', 'Knives', 'Blunt_Objects', 'Personal_Weapons', 'Poison', 'Pushed_Or_Thrown', 'Explosives', 'Fire', 'Narcotics', 'Drowning', 'Strangulation', 'Asphyxiation', 'Other']
Index(['Circumstance', 'Victims_2019', 'Victims_2020', 'Victims_2021',
       'Victims_2022', 'Victims_2023'],
      dtype='object')

Regional Breakdown

Index(['Region', 'Total_Weapons', 'Firearms_Percent', 'Knives_Percent',
       'Other_Weapons_Percent', 'Personal_Weapons_Percent'],
      dtype='object')
No description has been provided for this image

Table 3

Index(['Offender_Age', 'Total_Offenders', 'Male_Offenders', 'Female_Offenders',
       'Unknown_Sex', 'White', 'Black_African_American', 'Other_Race',
       'Unknown_Race', 'Hispanic_Latino', 'Not_Hispanic_Latino',
       'Unknown_Ethnicity'],
      dtype='object')
No description has been provided for this image

Male vs. Female Offenders

No description has been provided for this image
Index(['Offender_Age', 'Total_Offenders', 'Male_Offenders', 'Female_Offenders',
       'Unknown_Sex', 'White', 'Black_African_American', 'Other_Race',
       'Unknown_Race', 'Hispanic_Latino', 'Not_Hispanic_Latino',
       'Unknown_Ethnicity'],
      dtype='object')
No description has been provided for this image
No description has been provided for this image

Table 4: Victim/Offender Situations

Index(['Victim_Offender_Situation', 'Total_Cases'], dtype='object')
                     Victim_Offender_Situation  Total_Cases
0                                        Total      17713.0
1                Single victim/single offender       9037.0
2  Single victim/unknown offender or offenders       3497.0
3             Single victim/multiple offenders       2816.0
4             Multiple victims/single offender       1356.0
['Total' 'Single victim/single offender'
 'Single victim/unknown offender or offenders'
 'Single victim/multiple offenders' 'Multiple victims/single offender'
 'Multiple victims/multiple offenders'
 'Multiple victims/unknown offender or offenders'
 '1 Because of rounding, the percentages may not add to 100.0.']
No description has been provided for this image

Table 5: Victim Vs. Offender Age Comparison

Index(['Victim_Age', 'Total_Victims', 'Offender_Under_18',
       'Offender_18_and_Over', 'Offender_Unknown'],
      dtype='object')
                                          Victim_Age  Total_Victims  \
0                                            Unknown           55.0   
1  NOTE:  This table is based on incidents where ...            NaN   
2                                                NaN            NaN   
3                                                NaN            NaN   
4                                                NaN            NaN   

   Offender_Under_18  Offender_18_and_Over  Offender_Unknown  
0                0.0                  47.0               8.0  
1                NaN                   NaN               NaN  
2                NaN                   NaN               NaN  
3                NaN                   NaN               NaN  
4                NaN                   NaN               NaN  
No description has been provided for this image

Table 6: Single Victom/Single Offender Cases

Index(['Victim_Race', 'Total_Cases', 'Offender_White',
       'Offender_Black_African_American', 'Offender_Other', 'Offender_Unknown',
       'Offender_Male', 'Offender_Female', 'Offender_Unknown_Sex',
       'Offender_Hispanic_Latino', 'Offender_Not_Hispanic_Latino',
       'Offender_Unknown_Ethnicity'],
      dtype='object')
                 Victim_Race  Total_Cases  Offender_White  \
0                     White        4011.0          3102.0   
1  Black or African American       3823.0           324.0   
2               Other race1         292.0            85.0   
3               Unknown race        235.0            80.0   
4              Sex of victim          NaN             NaN   

   Offender_Black_African_American  Offender_Other  Offender_Unknown  \
0                            726.0            71.0             112.0   
1                           3282.0            18.0             199.0   
2                             51.0           147.0               9.0   
3                             76.0            13.0              66.0   
4                              NaN             NaN               NaN   

   Offender_Male  Offender_Female  Offender_Unknown_Sex  \
0         3606.0            380.0                  25.0   
1         3319.0            392.0                 112.0   
2          260.0             30.0                   2.0   
3          213.0             16.0                   6.0   
4            NaN              NaN                   NaN   

   Offender_Hispanic_Latino  Offender_Not_Hispanic_Latino  \
0                     866.0                        1804.0   
1                     132.0                        2453.0   
2                      29.0                         147.0   
3                      58.0                          84.0   
4                       NaN                           NaN   

   Offender_Unknown_Ethnicity  
0                       426.0  
1                       663.0  
2                        43.0  
3                        49.0  
4                         NaN  
No description has been provided for this image

Female Offender Breakdown by race

       Total_Cases  Offender_White  Offender_Black_African_American  \
count    10.000000       10.000000                        10.000000   
mean   2372.400000     1014.000000                      1180.500000   
std    2220.741328     1090.024974                      1388.703572   
min      22.000000        9.000000                        10.000000   
25%     395.250000      134.750000                       112.250000   
50%    1740.500000      592.000000                       537.500000   
75%    3964.000000     1659.500000                      2459.000000   
max    6042.000000     3102.000000                      3282.000000   

       Offender_Other  Offender_Unknown  Offender_Male  Offender_Female  \
count       10.000000         10.000000      10.000000        10.000000   
mean        68.900000        109.000000    2100.100000       231.200000   
std         61.688194         97.779798    1953.467484       226.027432   
min          2.000000          1.000000      18.000000         3.000000   
25%         18.500000         48.750000     351.000000        39.500000   
50%         50.000000         78.000000    1573.000000       149.000000   
75%        128.250000        172.000000    3534.250000       389.000000   
max        160.000000        312.000000    5335.000000       589.000000   

       Offender_Unknown_Sex  Offender_Hispanic_Latino  \
count             10.000000                 10.000000   
mean              41.100000                321.400000   
std               47.880523                342.106611   
min                1.000000                  4.000000   
25%                6.750000                 52.000000   
50%               20.000000                204.500000   
75%               79.250000                606.000000   
max              118.000000                866.000000   

       Offender_Not_Hispanic_Latino  Offender_Unknown_Ethnicity  
count                     10.000000                   10.000000  
mean                    1330.400000                  339.600000  
std                     1407.724815                  308.546845  
min                        8.000000                    4.000000  
25%                      178.000000                   60.750000  
50%                      780.000000                  300.000000  
75%                     2290.750000                  561.000000  
max                     3757.000000                  909.000000  
Offender_White                     10140.0
Offender_Black_African_American    11805.0
Offender_Other                       689.0
Offender_Unknown                    1090.0
dtype: float64
                           Total_Cases  Offender_White  \
Victim_Race                                              
White                           4011.0          3102.0   
Black or African American       3823.0           324.0   
Male                            6042.0          2386.0   
Not Hispanic or Latino          5113.0          1814.0   

                           Offender_Black_African_American  Offender_Other  \
Victim_Race                                                                  
White                                                726.0            71.0   
Black or African American                           3282.0            18.0   
Male                                                3184.0           160.0   
Not Hispanic or Latino                              2965.0           142.0   

                           Offender_Unknown  Offender_Male  Offender_Female  \
Victim_Race                                                                   
White                                 112.0         3606.0            380.0   
Black or African American             199.0         3319.0            392.0   
Male                                  312.0         5335.0            589.0   
Not Hispanic or Latino                192.0         4480.0            536.0   

                           Offender_Unknown_Sex  Offender_Hispanic_Latino  \
Victim_Race                                                                 
White                                      25.0                     866.0   
Black or African American                 112.0                     132.0   
Male                                      118.0                     804.0   
Not Hispanic or Latino                     97.0                     279.0   

                           Offender_Not_Hispanic_Latino  \
Victim_Race                                               
White                                            1804.0   
Black or African American                        2453.0   
Male                                             3220.0   
Not Hispanic or Latino                           3757.0   

                           Offender_Unknown_Ethnicity  
Victim_Race                                            
White                                           426.0  
Black or African American                       663.0  
Male                                            909.0  
Not Hispanic or Latino                          606.0  
Most common victim-offender combinations:
                           Total_Cases  Offender_White  \
Victim_Race                                              
Male                            6042.0          2386.0   
Not Hispanic or Latino          5113.0          1814.0   
White                           4011.0          3102.0   
Black or African American       3823.0           324.0   
Female                          2297.0          1196.0   

                           Offender_Black_African_American  Offender_Other  \
Victim_Race                                                                  
Male                                                3184.0           160.0   
Not Hispanic or Latino                              2965.0           142.0   
White                                                726.0            71.0   
Black or African American                           3282.0            18.0   
Female                                               941.0            87.0   

                           Offender_Unknown  Offender_Male  Offender_Female  \
Victim_Race                                                                   
Male                                  312.0         5335.0            589.0   
Not Hispanic or Latino                192.0         4480.0            536.0   
White                                 112.0         3606.0            380.0   
Black or African American             199.0         3319.0            392.0   
Female                                 73.0         2045.0            226.0   

                           Offender_Unknown_Sex  Offender_Hispanic_Latino  \
Victim_Race                                                                 
Male                                      118.0                     804.0   
Not Hispanic or Latino                     97.0                     279.0   
White                                      25.0                     866.0   
Black or African American                 112.0                     132.0   
Female                                     26.0                     277.0   

                           Offender_Not_Hispanic_Latino  \
Victim_Race                                               
Male                                             3220.0   
Not Hispanic or Latino                           3757.0   
White                                            1804.0   
Black or African American                        2453.0   
Female                                           1260.0   

                           Offender_Unknown_Ethnicity  
Victim_Race                                            
Male                                            909.0  
Not Hispanic or Latino                          606.0  
White                                           426.0  
Black or African American                       663.0  
Female                                          268.0  

Least common victim-offender combinations:
                     Total_Cases  Offender_White  \
Victim_Race                                        
Other race1                292.0            85.0   
Unknown race               235.0            80.0   
Unknown sex                 22.0             9.0   
Sex of victim                NaN             NaN   
Ethnicity of victim          NaN             NaN   

                     Offender_Black_African_American  Offender_Other  \
Victim_Race                                                            
Other race1                                     51.0           147.0   
Unknown race                                    76.0            13.0   
Unknown sex                                     10.0             2.0   
Sex of victim                                    NaN             NaN   
Ethnicity of victim                              NaN             NaN   

                     Offender_Unknown  Offender_Male  Offender_Female  \
Victim_Race                                                             
Other race1                       9.0          260.0             30.0   
Unknown race                     66.0          213.0             16.0   
Unknown sex                       1.0           18.0              3.0   
Sex of victim                     NaN            NaN              NaN   
Ethnicity of victim               NaN            NaN              NaN   

                     Offender_Unknown_Sex  Offender_Hispanic_Latino  \
Victim_Race                                                           
Other race1                           2.0                      29.0   
Unknown race                          6.0                      58.0   
Unknown sex                           1.0                       4.0   
Sex of victim                         NaN                       NaN   
Ethnicity of victim                   NaN                       NaN   

                     Offender_Not_Hispanic_Latino  Offender_Unknown_Ethnicity  
Victim_Race                                                                    
Other race1                                 147.0                        43.0  
Unknown race                                 84.0                        49.0  
Unknown sex                                   8.0                         4.0  
Sex of victim                                 NaN                         NaN  
Ethnicity of victim                           NaN                         NaN  
Offender_Male           21001.0
Offender_Female          2312.0
Offender_Unknown_Sex      411.0
dtype: float64
Male-to-Female Offender Ratio: 9.08
Index(['Total_Cases', 'Offender_White', 'Offender_Black_African_American',
       'Offender_Other', 'Offender_Unknown', 'Offender_Male',
       'Offender_Female', 'Offender_Unknown_Sex', 'Offender_Hispanic_Latino',
       'Offender_Not_Hispanic_Latino', 'Offender_Unknown_Ethnicity'],
      dtype='object')
No description has been provided for this image
No description has been provided for this image

Analyzing Homicide Circumstances by Relationship

Index(['Circumstance', 'Total_Victims', 'Husband', 'Wife', 'Mother', 'Father',
       'Son', 'Daughter', 'Brother', 'Sister', 'Other_Family', 'Boyfriend',
       'Girlfriend', 'Neighbor', 'Employee', 'Employer', 'Stranger',
       'Unknown'],
      dtype='object')
No description has been provided for this image
No description has been provided for this image

Comparing Family vs. Non-Family Homicide Trends Over Time

Index(['Circumstance', 'Victims_2019', 'Victims_2020', 'Victims_2021',
       'Victims_2022', 'Victims_2023'],
      dtype='object')
No description has been provided for this image

Comparing Homicide Circumstances

['Circumstances' 'Total' 'Felony type total:' 'Rape' 'Robbery' 'Burglary'
 'Larceny-theft' 'Motor vehicle theft' 'Arson'
 'Prostitution and commercialized vice' 'Other sex offenses'
 'Narcotic drug laws' 'Gambling' 'Other-not specified '
 'Human trafficking/Commercial sex acts'
 'Human trafficking/Involuntary servitude' 'Suspected felony type1'
 'Other than felony type total:' 'Domestic violence'
 'Child killed by babysitter' 'Brawl due to influence of alcohol1'
 'Brawl due to influence of narcotics1' 'Argument over money or property1'
 'Other arguments' 'Gangland killings' 'Juvenile gang killings'
 'Institutional killings' 'Sniper attack1' 'Unknown'
 '1 Figures for suspected felony type, brawl due to influence of alcohol, brawl due to influence of narcotics, argument over money or property, and sniper attack include only data submitted by Summary reporting agencies because these circumstances are not collected via the National Incident-Based Reporting System.'
 "NOTE: Prior years' crime data has been updated; therefore, data presented in this table may not match previously published data."]
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image

Table 8: Murder Victims by Weapons

File saved successfully!
Out[ ]:
Weapon_Type Victims_2019 Victims_2020 Victims_2021 Victims_2022 Victims_2023
0 Weapons 2019.0 2020.0 2021.0 2022.0 2023.0
1 Handguns 6544.0 8629.0 6720.0 8223.0 7159.0
2 Rifles 367.0 486.0 467.0 556.0 511.0
3 Shotguns 210.0 213.0 171.0 188.0 166.0
4 Other guns 48.0 108.0 299.0 431.0 398.0
Out[ ]:
Weapon_Type Victims_2019 Victims_2020 Victims_2021 Victims_2022 Victims_2023
0 Handguns 6544.0 8629.0 6720.0 8223.0 7159.0
1 Rifles 367.0 486.0 467.0 556.0 511.0
2 Shotguns 210.0 213.0 171.0 188.0 166.0
3 Other guns 48.0 108.0 299.0 431.0 398.0
4 Firearms, type not stated 3357.0 4991.0 5330.0 5846.0 5295.0
Index(['Weapon_Type', 'Victims_2019', 'Victims_2020', 'Victims_2021',
       'Victims_2022', 'Victims_2023'],
      dtype='object')
No description has been provided for this image
<ipython-input-97-97cde585f958>:2: FutureWarning: The default fill_method='pad' in DataFrame.pct_change is deprecated and will be removed in a future version. Either fill in any non-leading NA values prior to calling pct_change or specify 'fill_method=None' to not fill NA values.
  df8_pct_change = df8.pct_change(axis=1) * 100
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image

Table 9: Murder Victims by Age and Weapon

Out[ ]:
['.config', 'Cleaned_Table_8.csv', 'drive', 'sample_data']
Out[ ]:
Age_Group Total_Victims Firearms Knives Blunt_Objects Personal_Weapons Poison Explosives Fire Narcotics Strangulation Asphyxiation Other_Weapons
0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
1 Total 17713.0 13529.0 1562.0 317.0 659.0 20.0 0.0 92.0 230.0 10.0 94.0 1200.0
2 Percent distribution4 100.0 76.4 8.8 1.8 3.7 0.1 0.0 0.5 1.3 0.1 0.5 6.8
3 Under 185 1690.0 1207.0 69.0 15.0 151.0 6.0 0.0 8.0 41.0 4.0 21.0 168.0
4 Under 225 3807.0 3096.0 154.0 21.0 167.0 6.0 0.0 11.0 54.0 4.0 22.0 272.0
Out[ ]:
Victim_Age Total_Victims Firearms Knives Blunt_Objects Personal_Weapons Poison Explosives Fire Narcotics Strangulation Asphyxiation Other
0 Under 225 3807.0 3096.0 154.0 21.0 167.0 6.0 0.0 11.0 54.0 4.0 22.0 272.0
1 18 and over5 15835.0 12219.0 1480.0 300.0 489.0 13.0 0.0 82.0 187.0 5.0 72.0 988.0
2 Infant (under 1) 139.0 27.0 2.0 3.0 55.0 0.0 0.0 0.0 7.0 0.0 9.0 36.0
3 1 to 4 203.0 56.0 5.0 5.0 65.0 3.0 0.0 6.0 15.0 0.0 6.0 42.0
4 5 to 8 108.0 53.0 8.0 3.0 12.0 1.0 0.0 2.0 1.0 1.0 5.0 22.0
Out[ ]:
Victim_Age Total_Victims Firearms Knives Blunt_Objects Personal_Weapons Poison Explosives Fire Narcotics Strangulation Asphyxiation Other
0 Under 225 3807.0 3096.0 154.0 21.0 167.0 6.0 0.0 11.0 54.0 4.0 22.0 272.0
1 18 and over5 15835.0 12219.0 1480.0 300.0 489.0 13.0 0.0 82.0 187.0 5.0 72.0 988.0
2 Infant (under 1) 139.0 27.0 2.0 3.0 55.0 0.0 0.0 0.0 7.0 0.0 9.0 36.0
3 1 to 4 203.0 56.0 5.0 5.0 65.0 3.0 0.0 6.0 15.0 0.0 6.0 42.0
4 5 to 8 108.0 53.0 8.0 3.0 12.0 1.0 0.0 2.0 1.0 1.0 5.0 22.0
<ipython-input-108-18b1ec3d2a40>:3: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  df9[col] = pd.to_numeric(df9[col], errors="coerce")
Out[ ]:
0
Victim_Age object
Total_Victims float64
Firearms float64
Knives float64
Blunt_Objects float64
Personal_Weapons float64
Poison float64
Explosives float64
Fire float64
Narcotics float64
Strangulation float64
Asphyxiation float64
Other float64

Out[ ]:
['.config',
 'Cleaned_Table_9.csv',
 'Cleaned_Table_8.csv',
 'drive',
 'sample_data']
         Victim_Age  Total_Victims  Firearms  Knives  Blunt_Objects  \
0         Under 225         3807.0    3096.0   154.0           21.0   
1      18 and over5        15835.0   12219.0  1480.0          300.0   
2  Infant (under 1)          139.0      27.0     2.0            3.0   
3            1 to 4          203.0      56.0     5.0            5.0   
4            5 to 8          108.0      53.0     8.0            3.0   

   Personal_Weapons  Poison  Explosives  Fire  Narcotics  Strangulation  \
0             167.0     6.0         0.0  11.0       54.0            4.0   
1             489.0    13.0         0.0  82.0      187.0            5.0   
2              55.0     0.0         0.0   0.0        7.0            0.0   
3              65.0     3.0         0.0   6.0       15.0            0.0   
4              12.0     1.0         0.0   2.0        1.0            1.0   

   Asphyxiation  Other  
0          22.0  272.0  
1          72.0  988.0  
2           9.0   36.0  
3           6.0   42.0  
4           5.0   22.0  
Firearm Deaths: 28844.0
Non-Firearm Deaths: 8511.0
No description has been provided for this image
No description has been provided for this image

Table 11: Murder circumstances by Weapon

Out[ ]:
Murder Circumstances Unnamed: 1 Unnamed: 2 Unnamed: 4 Unnamed: 5 Unnamed: 6 Unnamed: 7 Unnamed: 8 Unnamed: 9 Unnamed: 10 Unnamed: 11 Unnamed: 12 Unnamed: 13 Unnamed: 14 Unnamed: 15 Unnamed: 16 Unnamed: 17 Unnamed: 18
0 by Weapon, 2023 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
1 Circumstances Total\nmurder\nvictims Total\nfirearms Handguns Rifles Shotguns Other\nguns or\ntype not\nstated Knives or\ncutting\ninstruments Blunt\nobjects\n(clubs,\nhammers,\netc.) Personal\nweapons\n(hands,\nfists, feet,\netc.) Poison Pushed\nor\nthrown\nout\nwindow1 Explosives Fire Narcotics Drowning1 Strangulation1 Asphyxiation Other
2 Total 17713 13529 7159 511 166 5693 1562 317 659 20 0 0 92 230 0 10 94 1200
3 Felony type total: 1321 907 522 24 11 350 85 27 35 1 0 0 39 130 0 4 7 86
4 Rape 10 1 0 0 0 1 0 1 3 0 0 0 1 1 0 1 1 1
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 34 entries, 0 to 33
Data columns (total 19 columns):
 #   Column                Non-Null Count  Dtype 
---  ------                --------------  ----- 
 0   Murder Circumstances  34 non-null     object
 1   Unnamed: 1            31 non-null     object
 2   Unnamed: 2            31 non-null     object
 3                         30 non-null     object
 4   Unnamed: 4            30 non-null     object
 5   Unnamed: 5            31 non-null     object
 6   Unnamed: 6            31 non-null     object
 7   Unnamed: 7            31 non-null     object
 8   Unnamed: 8            30 non-null     object
 9   Unnamed: 9            30 non-null     object
 10  Unnamed: 10           31 non-null     object
 11  Unnamed: 11           31 non-null     object
 12  Unnamed: 12           30 non-null     object
 13  Unnamed: 13           30 non-null     object
 14  Unnamed: 14           30 non-null     object
 15  Unnamed: 15           30 non-null     object
 16  Unnamed: 16           30 non-null     object
 17  Unnamed: 17           30 non-null     object
 18  Unnamed: 18           30 non-null     object
dtypes: object(19)
memory usage: 5.2+ KB
Out[ ]:
Murder Circumstances Unnamed: 1 Unnamed: 2 Unnamed: 4 Unnamed: 5 Unnamed: 6 Unnamed: 7 Unnamed: 8 Unnamed: 9 Unnamed: 10 Unnamed: 11 Unnamed: 12 Unnamed: 13 Unnamed: 14 Unnamed: 15 Unnamed: 16 Unnamed: 17 Unnamed: 18
0 by Weapon, 2023 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
1 Circumstances Total\nmurder\nvictims Total\nfirearms Handguns Rifles Shotguns Other\nguns or\ntype not\nstated Knives or\ncutting\ninstruments Blunt\nobjects\n(clubs,\nhammers,\netc.) Personal\nweapons\n(hands,\nfists, feet,\netc.) Poison Pushed\nor\nthrown\nout\nwindow1 Explosives Fire Narcotics Drowning1 Strangulation1 Asphyxiation Other
2 Total 17713 13529 7159 511 166 5693 1562 317 659 20 0 0 92 230 0 10 94 1200
3 Felony type total: 1321 907 522 24 11 350 85 27 35 1 0 0 39 130 0 4 7 86
4 Rape 10 1 0 0 0 1 0 1 3 0 0 0 1 1 0 1 1 1
Number of columns in df11: 19
New columns list length: 19
Standardized columns: ['Murder Circumstances', 'Unnamed: 1', 'Unnamed: 2', '', 'Unnamed: 4', 'Unnamed: 5', 'Unnamed: 6', 'Unnamed: 7', 'Unnamed: 8', 'Unnamed: 9', 'Unnamed: 10', 'Unnamed: 11', 'Unnamed: 12', 'Unnamed: 13', 'Unnamed: 14', 'Unnamed: 15', 'Unnamed: 16', 'Unnamed: 17', 'Unnamed: 18']
Renamed columns: ['Circumstance', 'Total_Victims', 'Total_Firearms', 'Handguns', 'Rifles', 'Shotguns', 'Other_Guns', 'Knives', 'Blunt_Objects', 'Personal_Weapons', 'Poison', 'Pushed_Or_Thrown', 'Explosives', 'Fire', 'Narcotics', 'Drowning', 'Strangulation', 'Asphyxiation', 'Other']
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
Index(['Circumstance', 'Total_Victims', 'Total_Firearms', 'Handguns', 'Rifles',
       'Shotguns', 'Other_Guns', 'Knives', 'Blunt_Objects', 'Personal_Weapons',
       'Poison', 'Pushed_Or_Thrown', 'Explosives', 'Fire', 'Narcotics',
       'Drowning', 'Strangulation', 'Asphyxiation', 'Other'],
      dtype='object')
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
Out[ ]:
Murder Circumstances, 2019–2023 Unnamed: 1 Unnamed: 2 Unnamed: 3 Unnamed: 4 Unnamed: 5 Unnamed: 6
0 Circumstances 2019.0 2020.0 2021.0 2022.0 2023.0 NaN
1 Total 14404.0 18857.0 16633.0 19939.0 17713.0 NaN
2 Felony type total: 2081.0 2175.0 1287.0 1633.0 1321.0 NaN
3 Rape 12.0 20.0 8.0 25.0 10.0 NaN
4 Robbery 520.0 565.0 263.0 397.0 312.0 NaN
['Murder Circumstances, 2019–2023', 'Unnamed: 1', 'Unnamed: 2', 'Unnamed: 3', 'Unnamed: 4', 'Unnamed: 5', 'Unnamed: 6']
['Circumstance', 'Victims_2019', 'Victims_2020', 'Victims_2021', 'Victims_2022', 'Victims_2023']
Total Homicides by Year: [14404. 18857. 16633. 19939. 17713.]
No description has been provided for this image
                     Justifiable Homicide Unnamed: 1       Unnamed: 2  \
0  by Weapon, Law Enforcement,1 2019–2023        NaN              NaN   
1                                    Year      Total  Total\nfirearms   
2                                    2019        380              372   
3                                    2020        338              331   
4                                    2021        220              214   

  Unnamed: 3 Unnamed: 4 Unnamed: 5                   Unnamed: 6  \
0        NaN        NaN        NaN                          NaN   
1   Handguns     Rifles   Shotguns  Firearms,\ntype not\nstated   
2        273         36          3                           60   
3        223         36          2                           70   
4        149         30          0                           35   

                        Unnamed: 7                 Unnamed: 8  \
0                              NaN                        NaN   
1  Knives or\ncutting\ninstruments  Other\ndangerous\nweapons   
2                                2                          3   
3                                1                          4   
4                                1                          4   

          Unnamed: 9  
0                NaN  
1  Personal\nweapons  
2                  3  
3                  2  
4                  1  
['Justifiable Homicide', 'Unnamed: 1', 'Unnamed: 2', 'Unnamed: 3', 'Unnamed: 4', 'Unnamed: 5', 'Unnamed: 6', 'Unnamed: 7', 'Unnamed: 8', 'Unnamed: 9']
Renamed columns: ['Justifiable_Homicide', 'Victims_2019', 'Victims_2020', 'Victims_2021', 'Victims_2022', 'Victims_2023']
Original columns: ['Justifiable Homicide', 'Unnamed: 1', 'Unnamed: 2', 'Unnamed: 3', 'Unnamed: 4', 'Unnamed: 5', 'Unnamed: 6', 'Unnamed: 7', 'Unnamed: 8', 'Unnamed: 9']
Renamed columns: ['Justifiable_Homicide', 'Victims_2019', 'Victims_2020', 'Victims_2021', 'Victims_2022', 'Victims_2023']
No description has been provided for this image
   Victims_2019  Victims_2020  Victims_2021  Victims_2022  Victims_2023
0           NaN           NaN           NaN           NaN           NaN
1           NaN           NaN           NaN           NaN           NaN
2         380.0         372.0         273.0          36.0           3.0
3         338.0         331.0         223.0          36.0           2.0
4         220.0         214.0         149.0          30.0           0.0
Victims_2019    float64
Victims_2020    float64
Victims_2021    float64
Victims_2022    float64
Victims_2023    float64
dtype: object
Unique values in Justifiable_Homicide: ['by Weapon, Law Enforcement,1 2019–2023' 'Year' '2019' '2020' '2021'
 '2022' '2023'
 '1 The killing of a felon by a law enforcement officer in the line of duty.'
 "NOTE: Prior years' crime data has been updated; therefore, data presented in this table may not match previously published data."]
Filtered DataFrame:
  Justifiable_Homicide  Victims_2019  Victims_2020  Victims_2021  \
2                 2019         380.0         372.0         273.0   
3                 2020         338.0         331.0         223.0   
4                 2021         220.0         214.0         149.0   
5                 2022         354.0         342.0         232.0   
6                 2023         303.0         296.0         195.0   

   Victims_2022  Victims_2023  
2          36.0           3.0  
3          36.0           2.0  
4          30.0           0.0  
5          38.0           1.0  
6          32.0           2.0  
Before filtering: ['by Weapon, Law Enforcement,1 2019–2023' 'Year' '2019' '2020' '2021'
 '2022' '2023'
 '1 The killing of a felon by a law enforcement officer in the line of duty.'
 "NOTE: Prior years' crime data has been updated; therefore, data presented in this table may not match previously published data."]
After filtering: ['2019' '2020' '2021' '2022' '2023']
                                Justifiable_Homicide  Victims_2019  \
0             by Weapon, Law Enforcement,1 2019–2023           NaN   
1                                               Year           NaN   
2                                               2019         380.0   
3                                               2020         338.0   
4                                               2021         220.0   
5                                               2022         354.0   
6                                               2023         303.0   
7  1 The killing of a felon by a law enforcement ...           NaN   
8  NOTE: Prior years' crime data has been updated...           NaN   

   Victims_2020  Victims_2021  Victims_2022  Victims_2023  
0           NaN           NaN           NaN           NaN  
1           NaN           NaN           NaN           NaN  
2         372.0         273.0          36.0           3.0  
3         331.0         223.0          36.0           2.0  
4         214.0         149.0          30.0           0.0  
5         342.0         232.0          38.0           1.0  
6         296.0         195.0          32.0           2.0  
7           NaN           NaN           NaN           NaN  
8           NaN           NaN           NaN           NaN  
  Justifiable_Homicide  Victims_2019  Victims_2020  Victims_2021  \
0                 Year           NaN           NaN           NaN   
1                 2019         380.0         372.0         273.0   
2                 2020         338.0         331.0         223.0   
3                 2021         220.0         214.0         149.0   
4                 2022         354.0         342.0         232.0   
5                 2023         303.0         296.0         195.0   

   Victims_2022  Victims_2023  
0           NaN           NaN  
1          36.0           3.0  
2          36.0           2.0  
3          30.0           0.0  
4          38.0           1.0  
5          32.0           2.0  
No description has been provided for this image
Original columns: ['Justifiable Homicide', 'Unnamed: 1', 'Unnamed: 2', 'Unnamed: 3', 'Unnamed: 4', 'Unnamed: 5', 'Unnamed: 6', 'Unnamed: 7', 'Unnamed: 8', 'Unnamed: 9']
Renamed columns: ['Justifiable_Homicide', 'Victims_2019', 'Victims_2020', 'Victims_2021', 'Victims_2022', 'Victims_2023']
['Justifiable_Homicide', 'Victims_2019', 'Victims_2020', 'Victims_2021', 'Victims_2022', 'Victims_2023']
<ipython-input-155-754f4aa8ca8b>:2: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  df15[col] = pd.to_numeric(df15[col], errors="coerce")
No description has been provided for this image
Unique Justifiable Homicide entries after filtering:
['by weapon, private citizen,1 2019–2023' 'year' '2019' '2020' '2021'
 '2022' '2023']
                                                                                                               Justifiable_Homicide
0                                                                                            by weapon, private citizen,1 2019–2023
1                                                                                                                              year
2                                                                                                                              2019
3                                                                                                                              2020
4                                                                                                                              2021
5                                                                                                                              2022
6                                                                                                                              2023
7                                                1 the killing of a felon, during the commission of a felony, by a private citizen.
8  note: prior years' crime data has been updated; therefore, data presented in this table may not match previously published data.
No description has been provided for this image